﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace BaseApplication
{
    public partial class frmMain : Form
    {
        public frmMain()
        {
            InitializeComponent();
        }

        private void frmMain_Load(object sender, EventArgs e)
        {
            var host = new HostService();
            host.FindModules(Application.StartupPath+@"\Plugins");
            foreach (var module in host.Modules)
            {
                menuStrip1.Items.Add(module.TopMenuTitle, null, (sender1, e1) => {
                    module.DoAction();
                });
            }
        }
    }
}
